<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Module: fonts</title>

<!--
    <script src="http://shjs.sourceforge.net/sh_main.min.js"> </script>
    <script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"> </script>
-->
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/node-dark.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">
    
    <h1 class="page-title">Module: fonts</h1>
    
    



<section>
    
<header>
    <h2>
    fonts
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
            <div class="description"><p>The <code>fwlib/fonts</code> module provides detailed information about fonts currently
installed on the OS by parsing the Adobe <code>.lst</code> font data files created by
CS6 suite apps.  These files are stored in <code>Adobe/TypeSupport/CS6/</code> in the
OS's user directory.</p></div>
        
        
        
<dl class="details">
    
        
	
	
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>lib/fwlib/fonts.js, line 5</li></ul></dd>
	
    
    
	
	
	
	
</dl>

        
        
    
    </div>
    
    
    
    
    
    
        <h3 class="subsection-title">Requires</h3>
        
        <ul>
            <li>module:fwlib/files</li>
        
            <li>module:fwlib/underscore</li>
        </ul>
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <h4 class="name" id="getInfo"><span class="type-signature">&lt;static> </span>getInfo</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>Returns detailed information about a font, based on the font name
returned by the Fireworks API.  The built-in <code>fw.getPlatformNameForPSFont()</code>
method returns the full name of the font, but that often isn't the same
name as would be used in CSS.  The <code>fonts.getInfo()</code> method, on the
other hand, can return additional information, such as the numeric
weight of a font.</p>

<p>For instance, if the selected text element's font is Adobe Caslon Pro
Semibold, then calling <code>fonts.getInfo(fw.selection[0].font)</code> would return:</p>

<pre><code>{
    family: "Adobe Caslon Pro",
    menu: "Adobe Caslon Pro",
    name: "Adobe Caslon Pro Semibold",
    shortName: "ACaslonPro-Semibold",
    style: "Semibold",
    weight: "600",
    width: "5",
    winName: "ACaslonPro-Semibold"
}
</code></pre>

<p>The result of <code>getInfo()</code> calls are cached, so subsequent calls for
information about the same font should return faster.</p>
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>inFontName</code></td>
            
            
            <td class="type">
            
                        String
                        
                    
            </td>
            
            
            
            
            
            <td class="description last"><p>The name of the font as expressed in the
Fireworks API, e.g., <code>fw.selection[0].font</code> when a text element is
selected.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>lib/fwlib/fonts.js, line 180</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>Returns an object containing details about the
specified font, or <code>null</code> if the font can't be found:
    <li> <code>shortName</code>: The name of the font in the Fireworks API.
    <li> <code>name</code>: The full name of the font, including style.
    <li> <code>family</code>: The family name of the font.
    <li> <code>style</code>: The font style.
    <li> <code>winName</code>: The Windows-specific name of the font.
    <li> <code>macName</code>: The Mac-specific name of the font.
    <li> <code>menu</code>: The name of the font as it appears in the menu.
    <li> <code>weight</code>: The font weight as a numeric string.
    <li> <code>width</code>: The width of the font as a numeric string.</p>
</div>




<dl>
	<dt>
		Type
	</dt>
	<dd>
		
		<span class="param-type">Object</span> 
		
	</dd>
</dl>

        
    
    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-DomStorage.html">DomStorage</a></li><li><a href="module-files.html">files</a></li><li><a href="module-fonts.html">fonts</a></li><li><a href="module-layers.html">layers</a></li><li><a href="module-prefs.html">prefs</a></li><li><a href="module-underscore.html">underscore</a></li></ul><h3>Classes</h3><ul><li><a href="a321565296.html">DomStorage</a></li><li><a href="module-layers.Layer.html">Layer</a></li><li><a href="module-layers.LayerTree.html">LayerTree</a></li><li><a href="module-prefs.PrefsStorage.html">PrefsStorage</a></li><li><a href="_.html">_</a></li></ul>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3</a> on Mon Jul 08 2013 09:13:10 GMT-0700 (PDT)
</footer>

<script> sh_highlightDocument(); </script>
</body>
</html>
